<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<title>票款清分录入</title>
<meta name="keywords" content="胆款流转实时监控管理系统 v1.0">
<meta name="description" content="胆款流转实时监控管理系统 v1.0">
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
	<span class="c-gray en">&gt;</span>
	业务管理
	<span class="c-gray en">&gt;</span>
	票款清分录入
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-member-add">
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>清分日期：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="date" class="input-text" id="clearingDate" name="clearingDate">
			</div>
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>分公司：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<select class="select" id="companyid" name="companyid"></select>
			</div>
		</div>
		<br />
		<hr />
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">收取票胆个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="receivedCashboxAmount" name="boxBagRecord.receivedCashboxAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">清点票胆个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="checkedCashboxAmount" name="boxBagRecord.checkedCashboxAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">未清点胆个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="uncheckedCashboxAmount" name="boxBagRecord.uncheckedCashboxAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">返还空胆个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="sentCashboxAmount" name="boxBagRecord.sentCashboxAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">发现坏胆个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="breakedCashboxAmount" name="boxBagRecord.breakedCashboxAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">收取款包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="receivedTMoneybagAmount" name="boxBagRecord.receivedTMoneybagAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">清点款包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="checkedTMoneybagAmount" name="boxBagRecord.checkedTMoneybagAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">未清点包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="uncheckedTMoneybagAmount" name="boxBagRecord.uncheckedTMoneybagAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">返还空包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="sentTMoneybagAmount" name="boxBagRecord.sentTMoneybagAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">收取款包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="receivedRMoneybagAmount" name="boxBagRecord.receivedRMoneybagAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">清点款包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="checkedRMoneybagAmount" name="boxBagRecord.checkedRMoneybagAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">未清点包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="uncheckedRMoneybagAmount" name="boxBagRecord.uncheckedRMoneybagAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">返还空包个数：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="sentRMoneybagAmount" name="boxBagRecord.sentRMoneybagAmount">
			</div>
		</div>
		<br />
		<hr />
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">无人售票金额：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="checkedSelfsvcMoney" name="checkedRecord.checkedSelfsvcMoney">
			</div>
			<label class="form-label col-xs-3 col-sm-2">有人售票金额：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="checkedTicketMoney" name="checkedRecord.checkedTicketMoney">
			</div>
			<label class="form-label col-xs-3 col-sm-2">票款金额小计：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="checkedTotalMoney" name="checkedRecord.checkedTotalMoney">
			</div>
			<label class="form-label col-xs-3 col-sm-2">充值金额小计：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="checkedRechargeMoney" name="checkedRecord.checkedRechargeMoney">
			</div>
			<label class="form-label col-xs-3 col-sm-2">垫资有人金额：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="advancedTicketMoney" name="checkedRecord.advancedTicketMoney">
			</div>
			<label class="form-label col-xs-3 col-sm-2">垫资充值金额：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="advancedRechargeMoney" name="checkedRecord.advancedRechargeMoney">
			</div>
			<label class="form-label col-xs-3 col-sm-2">入账有人金额：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="accountedTicketMoney" name="checkedRecord.accountedTicketMoney">
			</div>
			<label class="form-label col-xs-3 col-sm-2">入账充值金额：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0.00" step="0.01" class="input-text" placeholder="" id="accountedRechargeMoney" name="checkedRecord.accountedRechargeMoney">
			</div>
		</div>
		<br />
		<hr />
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">点款完成时间：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="time" step="1" class="input-text" placeholder="" id="checkedTimeStr" onchange="timeToSeconds(this, 'checkedTime')">
				<input type="hidden" id="checkedTime" name="managedRecord.checkedTime"/>
			</div>
			<label class="form-label col-xs-3 col-sm-2">结账完成时间：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="time" step="1" class="input-text" placeholder="" id="accountedTimeStr" onchange="timeToSeconds(this, 'accountedTime')">
				<input type="hidden" id="accountedTime" name="managedRecord.accountedTime"/>
			</div>
			<label class="form-label col-xs-3 col-sm-2">清点人员数量：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="workers" name="managedRecord.workers">
			</div>
			<label class="form-label col-xs-3 col-sm-2">人员增减数量：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="changedWorkers" name="managedRecord.changedWorkers">
			</div>
			<label class="form-label col-xs-3 col-sm-2">假币残币数量：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="damagedMoneyAmount" name="managedRecord.damagedMoneyAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">胆内异物数量：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="specialBodyAmount" name="managedRecord.specialBodyAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">异物处理情况：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="solvedSpecialAmount" name="managedRecord.solvedSpecialAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">大额钞币数量：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="largeMoneyAmount" name="managedRecord.largeMoneyAmount">
			</div>
			<label class="form-label col-xs-3 col-sm-2">大额钞币处理：</label>
			<div class="formControls col-xs-3 col-sm-2">
				<input type="number" min="0" class="input-text" placeholder="" id="solvedLargeAmount" name="managedRecord.solvedLargeAmount">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="js/jquery.base64.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript" src="js/vue.js" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
	$('#clearingDate').val(today());
	
	$.ajax({
		url: ipAddress + '/base/company/getList',
		data: {
			order: "ordercode"
		},
		beforeSend: function (request) {
			request.setRequestHeader("Authorization", "Bearer " + getToken());
		},
		method:'GET',
		success:function (data,status,request) {
			console.log(data);
			$("#companyid").append("<option value>请选择分公司</option>");
			for(var i = 0; i < data.length; i ++){
				$("#companyid").append("<option value='" + data[i].companyid + "'>" + data[i].companyname + "</option>");
			}
		},
		error:function (request, msg, obj) {
			var respTxtObj = JSON.parse(request.responseText);
			console.log(respTxtObj);
			console.log(respTxtObj.error);
			console.log(respTxtObj.error_description);
		}
	});
	
	$("#form-member-add").validate({
		rules:{
			clearingDate:{
				required:true
			},
			companyid:{
				required:true
			}
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler: function(form){
			console.log(form);
			// 1.基本参数设置 
		    var options = { 
				type: 'POST',     // 设置表单提交方式
		        url: ipAddress + 'demo/clearingReport/save',    // 设置表单提交URL,默认为表单Form上action的路径
		        dataType: 'json',    // 返回数据类型
				headers: {
					'Authorization': "Bearer " + getToken()
				},
		        beforeSubmit: function(formData, jqForm, option){    // 表单提交之前的回调函数，一般用户表单验证
		            // formData: 数组对象,提交表单时,Form插件会以Ajax方式自动提交这些数据,格式Json数组,形如[{name:userName, value:admin},{name:passWord, value:123}]
		            // jqForm: jQuery对象,，封装了表单的元素   
		            // options: options对象
		            var str = $.param(formData);    // name=admin&passWord=123
		            var dom = jqForm[0];    // 将jqForm转换为DOM对象
		            var name = dom.name.value;    // 访问jqForm的DOM元素
		            /* 表单提交前的操作 */
		            return true;  // 只要不返回false,表单都会提交  
		        },
		        success: function(responseText, statusText, xhr, $form){    // 成功后的回调函数(返回数据由responseText获得)
		            if (responseText == '1') {
		                alert("操作成功!");
		                /* 成功后的操作 */
		            } else {
		                alert("操作失败!");    // 成功访问地址，并成功返回数据，由于不符合业务逻辑的失败
		            }
		        },  
		        error: function(xhr, status, err) {            
		            alert("操作失败!");    // 访问地址失败，或发生异常没有正常返回
		        },
		        clearForm: true,    // 成功提交后，清除表单填写内容
		        resetForm: true    // 成功提交后，重置表单填写内容
		    }; 
			$(form).ajaxSubmit(options);
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>